package com.matt.system.dao;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.matt.system.domain.TSysuser;

public interface UserDao {

	public List<TSysuser> findAll();
	
	public long getRows();
	
	public List<TSysuser> findAllByPage(final int pageNow,final int pageSize);

	public TSysuser findByCode(String name);

	public void addUser(TSysuser user);

	public void delUser(TSysuser user);

	public void updateUser(TSysuser user);

	public TSysuser findByNameAndPassword(String name, String password);
	
	public List<TSysuser> findPageByCriteria(final int pageNow,final int pageSize,DetachedCriteria detachedCriteria);
	
	public long getCountByCriteria(final DetachedCriteria detachedCriteria );

}